Skip to content

押金撤销 ​

撤销押金订单

请求参数类型描述
base_uristring声明接入点https://apihk.mch.weixin.qq.com/(香港接入)
out_trade_nostring商户订单号
jsonobject声明请求的JSON数据结构
sp_appidstring机构APPID
sub_appidstring子商户APPID
sub_mchidstring子商户号
php
$instance->v3->global->settle->depositOrders->_out_trade_no_->reverse->postAsync([
  'base_uri' => 'https://apihk.mch.weixin.qq.com/', // 接入点(香港接入)
  'out_trade_no' => '1217752501201407033233368018',
  'json' => [
    'sp_appid'  => 'wx8888888888888888',
    'sub_appid' => 'wx8888888888888888',
    'sub_mchid' => '1900000109',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance->chain('v3/global/settle/deposit-orders/{out_trade_no}/reverse')->postAsync([
  'base_uri' => 'https://apihk.mch.weixin.qq.com/', // 接入点(香港接入)
  'out_trade_no' => '1217752501201407033233368018',
  'json' => [
    'sp_appid'  => 'wx8888888888888888',
    'sub_appid' => 'wx8888888888888888',
    'sub_mchid' => '1900000109',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance['v3/global/settle/deposit-orders/{out_trade_no}/reverse']->postAsync([
  'base_uri' => 'https://apihk.mch.weixin.qq.com/', // 接入点(香港接入)
  'out_trade_no' => '1217752501201407033233368018',
  'json' => [
    'sp_appid'  => 'wx8888888888888888',
    'sub_appid' => 'wx8888888888888888',
    'sub_mchid' => '1900000109',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$response = $instance->v3->global->settle->depositOrders->_out_trade_no_->reverse->post([
  'base_uri' => 'https://apihk.mch.weixin.qq.com/', // 接入点(香港接入)
  'out_trade_no' => '1217752501201407033233368018',
  'json' => [
    'sp_appid'  => 'wx8888888888888888',
    'sub_appid' => 'wx8888888888888888',
    'sub_mchid' => '1900000109',
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance->chain('v3/global/settle/deposit-orders/{out_trade_no}/reverse')->post([
  'base_uri' => 'https://apihk.mch.weixin.qq.com/', // 接入点(香港接入)
  'out_trade_no' => '1217752501201407033233368018',
  'json' => [
    'sp_appid'  => 'wx8888888888888888',
    'sub_appid' => 'wx8888888888888888',
    'sub_mchid' => '1900000109',
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance['v3/global/settle/deposit-orders/{out_trade_no}/reverse']->post([
  'base_uri' => 'https://apihk.mch.weixin.qq.com/', // 接入点(香港接入)
  'out_trade_no' => '1217752501201407033233368018',
  'json' => [
    'sp_appid'  => 'wx8888888888888888',
    'sub_appid' => 'wx8888888888888888',
    'sub_mchid' => '1900000109',
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
返回字典类型描述
consumption_statestring押金消费状态
total_amountstring押金标价金额
total_amount_currencystring押金标价币种
transaction_idstring微信订单号
out_trade_nostring商户订单号
success_timestring支付成功时间
consume_amountstring押金消费标价金额
consume_amount_currencystring押金消费标价币种
consume_timestring押金消费时间

参阅 官方文档

Published on the GitHub by TheNorthMemory